﻿<!DOCTYPE html>
<html>

<head>
	<meta charset=utf-8>
	<title>Culling</title>
	<link href="../base.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<div class="main">
		<h1>Culling</h1>
		
		<h2>Overview</h2>
		<p>      
Effekseer has culling function. You can omit render effects that are outside the screen.
When using this function, it is necessary that the effect is set to culling. Effects not culled are always drawn.
		</p>

		<h2>Culling</h2>
		<p>
A sample is "RuntimeSample/Culling.sln"
		</p>
    
		<p>
You can activate culling with "::Effekseer::Manager::CreateCullingWorld".
This function specifies the range in which culling can be executed fast.
Higher layerCount speeds culling but consumes memory. It is about 6 at the maximum.
		</p>

    <p>
By executing "Effekseer::Manager::CalcCulling" before drawing the effect,
Only effects that exist inside of screen be drawn. The argument specifies the camera projection matrix and whether effects are rendered with OpenGL.
		</p>
    
<pre>
<code>
// Set the range for culling
g_manager->CreateCullingWorld( 1000.0f, 1000.0f, 1000.0f, 5);


// Create effects, etc


// Render

// Calculate a culling
g_manager->CalcCulling( g_renderer->GetCameraProjectionMatrix(), false );

</code>
</pre>

	</div>
</body>

</html>